'use strict';

describe('Filter: cityState', function() {

  // load the filter's module
  beforeEach(module('webappApp'));

  // initialize a new instance of the filter before each test
  var cityState, address;
  beforeEach(inject(function($filter) {
    cityState = $filter('cityState');
  }));

  it('should return the city and state', function() {
    address = {
      city: 'Testylvania',
      state: 'ST'
    };
    expect(cityState(address)).toBe('Testylvania, ST');
  });

  it('should return undefined if the address is undefined', function() {
    expect(cityState(address)).toBeUndefined();
  });
});